<div class="layui-fluid nepadmin-pad0 nepadmin-mar0 list0" id="list" lay-title="日志查询">
	<div class="layui-fluid">
		<div class="layui-row layui-col-space15">
			<div class="layui-col-md12">
				<div class="layui-card hxr-layui-card" id="userlistv">
					<div class="layui-form layui-card-header hxradmin-card-header">
						<div class="layui-form-item">
							<div class="layui-inline">
								<label class="layui-form-label">关键词查询</label>
								<div class="layui-input-inline">
									<input type="text" name="user" placeholder="操作员" class="layui-input" autocomplete="off">
								</div>
							</div>
							<div class="layui-inline">
								<label class="layui-form-label">平台类型</label>
								<div class="layui-input-inline">
									<div class="layui-unselect layui-form-select">
										<div class="layui-select-title"><input name="status" type="text" placeholder="选择平台" value="" readonly class="layui-input layui-unselect"><i
											 class="layui-edge"></i></div>
										<dl class="layui-anim layui-anim-upbit" style="">
											<dd lay-value="" class="layui-select-tips layui-this">选择平台</dd>
											<dd data='1'>管理后台</dd>
											<dd data='2'>代理后台</dd>
											<dd data='3'>小程序</dd>
										</dl>
									</div>
								</div>
							</div>
							<div class="layui-inline">
								<button class="layui-btn" data-type="reload" id="search">搜索</button>
							</div>
						</div>
					</div>
					<div class="layui-card-body">
						<table class="layui-hide" id="list-table" lay-filter="list-table"></table>
						<script type="text/html" id="platform_type">
						  {{#  if(d.platform_type === 1){ }}
							管理后台
						  {{#  } else if(d.platform_type === 2) { }}
						   代理后台
						   {{#  } else if(d.platform_type === 3) { }}
						    小程序
						  {{#  } }}
						</script>
						<script type="text/html" id="act_type">
						  {{#  if(d.act_type === 1){ }}
							系统
						  {{#  } else if(d.act_type === 2) { }}
						   角色
						   {{#  } else if(d.act_type === 3) { }}
						    权限
							{{#  } else if(d.act_type === 4) { }}
							 设备
							 {{#  } else if(d.act_type=== 5) { }}
							  设备分组
							  {{#  } else if(d.act_type === 6) { }}
							  设备计费
							   {{#  } else if(d.act_type === 7) { }}
							   营销
								{{#  } else if(d.act_type === 8) { }}
								用户
								 {{#  } else if(d.act_type === 9) { }}
								 代理商
								  {{#  } else if(d.act_type === 10) { }}
								   会员
								   {{#  } else if(d.act_type === 11) { }}
								    任务
									{{#  } else if(d.act_type === 12) { }}
									跟换设备
						  {{#  } }}
						</script>
					</div>
				</div>
			</div>
		</div>
	</div>
</div>
<script>
	var formurl='drawings/drawingsform',formarea=['500px', '570px'];
	//表格数据渲染
	layui.use(['table', 'form','laydate'], function() {
		var table = layui.table,
			form = layui.form,
			$ = layui.$,laydate=layui.laydate;
			//日期范围
			  laydate.render({
			    elem: '#date'
			    ,range: true
			  });
			layui.admin.initlist(table,'admins/act_log_list',240,[
						[{
							field: 'log_id',
							title: 'ID',
							width: 60
						},{
							field: 'platform_type',
							title: '操作平台',
							width: 150,
							templet:'#platform_type'
						}, {
							field: 'act_type',
							title: '操作类别',
							width: 150,
							templet:'#act_type'
						}, {
							field: 'operator',
							title: '操作员',
							width: 150
						}, {
							field: 'description',
							title: '操作信息',
							minWidth: 200
						}, {
							field: 'create_time',
							title: '操作时间',
							width: 200
						}]
					])

		//搜索
		$('#search').on('click', function() {
			var obj=$(this).parents('.layui-form-item');
			var val1 = obj.find('input[name="user"]').val();
			val2 = obj.find('input[name="status"]').attr('data');
			layui.admin.reloads({
				search_text:val1,
				status:val2
			});
		});
	});
</script>
